package day05;

public class MathDemo {
    public static void main(String[] args) {
       int m= Math.abs(-10);
        System.out.println("绝对值"+m);
        double m1=Math.pow(2,2);
        System.out.println("2的2次方"+m1);
        double c = Math.ceil(-1.1);
        System.out.println(c+"向上取整");
        double floor = Math.floor(1.1);
        System.out.println(floor+"向下取整");
        int max = Math.max(2, 5);
        System.out.println("最大值"+max);
        int min = Math.min(25, 21);
        System.out.println("最小值"+min);
        long round = Math.round(5.4);
        System.out.println("四舍五入"+round);
        double random = Math.random();
        System.out.println("[0.0,1.0)的随机数"+random);

    }
}
